<template>
  <div>
   <h2>{{proname}}</h2>
   <p>{{proprice.toFixed(2)}}</p>
   <p>{{info}}</p>
   <button @click="fn">砍一刀</button>
    
  </div>
</template>
<script>
export default {
  props:['proname','proprice','info','idx'],
  methods: {
    fn(){
      const n = Math.floor(Math.random()*10)
      this.$emit('pdd',{'idx':this.idx,n})
    }
  },
}
</script>